package com.swt.gap.model.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@NoArgsConstructor
@Data
public class EventElementParsDTO {

    @JsonProperty("comments")
    private String comments;
    @JsonProperty("id")
    private String id;
    @JsonProperty("results")
    private ResultsDTO results;
    @JsonProperty("status")
    private String status;

    @NoArgsConstructor
    @Data
    public static class ResultsDTO {
        @JsonProperty("author")
        private Object author;
        @JsonProperty("date")
        private Object date;
        @JsonProperty("document_name")
        private String documentName;
        @JsonProperty("pars")
        private List<ParsDTO> pars;
        @JsonProperty("source")
        private Object source;
        @JsonProperty("text")
        private String text;
        @JsonProperty("title")
        private Object title;
        @JsonProperty("url")
        private Object url;

        @NoArgsConstructor
        @Data
        public static class ParsDTO {

            @JsonProperty("par_begin")
            private Integer parBegin;
            @JsonProperty("par_end")
            private Integer parEnd;
            @JsonProperty("sents")
            private List<SentsDTO> sents;

            @NoArgsConstructor
            @Data
            public static class SentsDTO {

                @JsonProperty("pred_entity_mentions")
                private List<PredEntityMentionsDTO> predEntityMentions;
                @JsonProperty("pred_time_space_mentions")
                private List<PredTimeSpaceMentionsDTO> predTimeSpaceMentions;
                @JsonProperty("sent_begin")
                private Integer sentBegin;
                @JsonProperty("sent_end")
                private Integer sentEnd;
                @JsonProperty("text")
                private String text;

                @NoArgsConstructor
                @Data
                public static class PredEntityMentionsDTO {

                    @JsonProperty("begin")
                    private Integer begin;
                    @JsonProperty("end")
                    private Integer end;
                    @JsonProperty("subtype")
                    private String subtype;
                    @JsonProperty("subtype_cn")
                    private String subtypeCn;
                    @JsonProperty("text")
                    private String text;
                    @JsonProperty("type")
                    private String type;
                    @JsonProperty("type_cn")
                    private String typeCn;
                }

                @NoArgsConstructor
                @Data
                public static class PredTimeSpaceMentionsDTO {

                    @JsonProperty("begin")
                    private Integer begin;
                    @JsonProperty("end")
                    private Integer end;
                    @JsonProperty("place_stream")
                    private String placeStream;
                    @JsonProperty("subtype")
                    private String subtype;
                    @JsonProperty("subtype_cn")
                    private String subtypeCn;
                    @JsonProperty("text")
                    private String text;
                    @JsonProperty("type")
                    private String type;
                    @JsonProperty("type_cn")
                    private String typeCn;
                    @JsonProperty("normalization")
                    private String normalization;
                    @JsonProperty("time_stream")
                    private String timeStream;
                }
            }
        }
    }


    /*private String comments;
    private String id;
    @JsonProperty("results")
    private ResultsDTO results;
    private String status;

    @NoArgsConstructor
    @Data
    public static class ResultsDTO {

        private Object author;
        private Object date;
        private String documentName;
        private List<ParsDTO> pars;
        private Object source;
        private String text;
        private Object title;
        private Object url;

        @NoArgsConstructor
        @Data
        public static class ParsDTO {

            private Integer parBegin;
            private Integer parEnd;
            private List<SentsDTO> sents;

            @NoArgsConstructor
            @Data
            public static class SentsDTO {

                private List<PredEntityMentionsDTO> predEntityMentions;
                private List<PredTimeSpaceMentionsDTO> predTimeSpaceMentions;
                private Integer sentBegin;
                private Integer sentEnd;
                private String text;

                @NoArgsConstructor
                @Data
                public static class PredEntityMentionsDTO {

                    private Integer begin;
                    private Integer end;
                    private String subtype;
                    private String subtypeCn;
                    private String text;
                    private String type;
                    private String typeCn;
                }

                @NoArgsConstructor
                @Data
                public static class PredTimeSpaceMentionsDTO {
                    private Integer begin;
                    private Integer end;
                    private String placeStream;
                    private String subtype;
                    private String subtypeCn;
                    private String text;
                    private String type;
                    private String typeCn;
                    private String normalization;
                    private String timeStream;
                }
            }
        }
    }*/
}
